#pragma once

#include "Game/Process/RenderProcess.h"
#include "Render/Texture/Picture2DTexture.h"
#include "Render/Texture/RenderTarget.h"
#include "Render/Tradition/RHIRenderPass.h"
#include "Render/Tradition/GraphicsPipeline.h"
#include "Render/Texture/ColorRenderTarget.h"
#include "Render/Texture/DepthRenderTarget.h"
#include "Render/Shader/RHIDescriptor.h"
#include "Render/Tradition/RHIFramebuffer.h"
#include "LocalShader.h"


class BloomProcess : public RenderProcess
{
	DECLARE_PROCESS(BloomProcess)

protected:

	virtual void OnInit() override;

	virtual void OnTick(float deltaTime) override;

	virtual void OnResize() override;

protected:

	RefCountPtr<RHISampler> mSampler;

	ShaderPtr<BloomFragmentShader> mHorBloomFragmentShader;

	DescriptorMask mHorDescriptorMask;

	RefCountPtr<RHIDescriptor> mHorDescriptor;

	RefCountPtr<ColorRenderTarget> mHorColorRenderTarget;

	RefCountPtr<GraphicsPipeline> mHorPipeline;

	RefCountPtr<RHIRenderPass> mHorRenderPass;

	RefCountPtr<RHIFrameBuffer> mHorFrameBuffer;




	ShaderPtr<BloomFragmentShader> mVerBloomFragmentShader;

	DescriptorMask mVerDescriptorMask;

	RefCountPtr<RHIDescriptor> mVerDescriptor;

	RefCountPtr<ColorRenderTarget> mVerColorRenderTarget;

	RefCountPtr<GraphicsPipeline> mVerPipeline;

	RefCountPtr<RHIRenderPass> mVerRenderPass;

	RefCountPtr<RHIFrameBuffer> mVerFrameBuffer;
};
